#### Produce some plots

### Read in raw data

abund = read.csv('/home1/99/jc152199/Abundance/AbundanceBySample.csv',header=T)

### Install library

library('mvpart')

#### Change factor columns to character

abund$date = as.character(abund$date)
abund$start = as.character(abund$start)

#### Start by removing unneccesary columns from abund and re-structuring dataframe

abund = data.frame(abund[,1:7], month=substr(abund$date,3,4), hour=substr(abund$start,1,2), abund[,c(9,13,15:16,18:20,23:24)])

#### Now do something that actually makes a fucking difference

#########################################

#### I think that the structure of my data frame is wrong, it would need abundance of each species from a sample all on one line

### Subset to a single species will eliminate this problem for now

crabund = abund[which(abund$spp=='CARRUBR'),]

### Now there are going to be some problems with columns that are factors or characters, remove them...

crabund = crabund[,c(



### First create a dissimilarity matrix

dmat = gdist(abund, method='manhattan')